/* Copyright (C) 2021 Rain */

/* This file is part of Panda. */

/* 
  Cunix is free software: you can redistribute it and/or modify 
  it under the terms of the GNU General Public License as published by 
  the Free Software Foundation, either version 3 of the License, or 
  (at your option) and later version. 
*/

/*
  Panda is distributed in the hope that it will be useful, 
  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
  GNU General Public License for more details. 
*/

/*
  You should have received a copy of the GNU General Public License 
   along with Panda. If not, see <https://www.gnu.org/licenses/>.  
*/




#ifndef __DEFINES_H__
#define __DEFINES_H__

/* type of this object */

/* OBJTYPE_NOTE: like `#` or `//` */

/* OBJTYPE_OPERATOR: like '+', '-', '*', '/', '(', ')' or ',' */

#define OBJTYPE_KEYWORD  0x01
#define OBJTYPE_NUMBER   0x02
#define OBJTYPE_NAME     0x03
#define OBJTYPE_NOTE     0x04
#define OBJTYPE_OPERATOR 0x05

/* VARTYPE_NUM: standard 64 bit interger */
/* VARTYPE_PTR: pointer (32/64 bit) */
/* VARTYPE_FLT: emulating floating number (no support) */

#define VARTYPE_NUM 0x01
#define VARTYPE_PTR 0x02
#define VARTYPE_FLT 0x03

/* define a 64bit variable (long) */
#define KWORD_INT   0x0001

/* define a 64bit variable (double) */
#define KWORD_FLOAT 0x0002

/* else */
#define KWORD_ELSE  0x0003

/* for (a; b; c) {
 *      d
 * }
 * */
#define KWORD_FOR   0x0004

/* if */
#define KWORD_IF    0x0005

/* class */
#define KWORD_CLASS 0x0006

/* while */
#define KWORD_WHILE 0x0007


#define WTYPE_NUMBER 1
#define WTYPE_KWORD  2
#define WTYPE_OPRT   3
#define WTYPE_NAME   4
#define WTYPE_UNKNOW 5
#define WTYPE_STR    6


#endif
